.redirect-modal-mask {
  position: fixed;
  inset: 0;
  z-index: var(--redirect-z-index);

  display: flex;
  align-items: center;
  justify-content: center;

  backdrop-filter: blur(10px);

  @media print {
    display: none;
  }
}

.redirect-modal-wrapper {
  position: relative;
  z-index: 1500;

  overflow: hidden;

  max-width: 80vw;
  padding: 1rem 2rem;
  border-radius: 0.5rem;

  background: var(--redirect-c-bg);
  box-shadow: 0 2px 6px 0 var(--redirect-c-shadow);
}

.redirect-modal-hint {
  margin-top: 0.5rem;
  color: var(--vp-c-text-mute);
  font-size: 0.875rem;
  text-align: start;

  input[type='checkbox'] {
    position: relative;

    vertical-align: text-bottom;

    height: 1em;
    margin-inline-end: 18px;

    font-size: inherit;

    cursor: pointer;

    appearance: none;

    &::after {
      content: ' ';

      position: absolute;
      top: 0;

      display: inline-block;

      box-sizing: border-box;
      width: 14px;
      height: 14px;
      padding-inline-start: 0;
      border: 1px solid var(--vp-c-border);
      border-radius: 50%;

      background: var(--vp-c-control);

      text-align: center;

      visibility: visible;
    }

    &:checked {
      &::after {
        content: '';
        border-color: var(--vp-c-accent-bg);
        background: var(--vp-c-accent-bg);
      }

      &::before {
        content: '';

        position: absolute;
        inset-inline-start: 5px;
        top: 2px;
        z-index: 1;

        width: 2px;
        height: 6px;
        border: solid var(--vp-c-white);
        border-width: 0 2px 2px 0;

        transform: rotate(45deg);
      }
    }
  }

  label {
    display: inline-block;
  }
}

.redirect-modal-action {
  display: block;

  width: 100%;
  margin: 1rem 0;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.5rem;

  background-color: var(--redirect-c-control);
  color: inherit;

  cursor: pointer;

  &:hover {
    background-color: var(--redirect-c-control-hover);
  }

  &.primary {
    background-color: var(--redirect-c-accent-bg);
    color: var(--redirect-c-accent-text);

    &:hover {
      background-color: var(--redirect-c-accent-hover);
    }
  }
}
